package com.example.droidheroes;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.TextView;

public class MainActivity extends Activity {
	
	public final static String EXTRA_MESSAGE = "com.example.DroidHeroes.GameType";
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }
    
    public static void showError(Activity a, String e){
    	TextView view = new TextView(a);
    	view.setTextSize(30);
    	view.setText(e);
    	a.setContentView(view);
    }
    
    /*
     * The single player option
     */
    public void singlePlayer(View view){
    	Intent intent = new Intent(this, SetupActivity.class);
    	intent.putExtra(EXTRA_MESSAGE, false);
    	startActivity(intent);
    }
    
    /*
     * The multiplayer option
     */
    public void multiPlayer(View view){
    	Intent intent = new Intent(this, SetupActivity.class);
    	intent.putExtra(EXTRA_MESSAGE, true);
    	startActivity(intent);
    }
}
